package com.dongrj.framework.core.model;

import java.util.List;

public final class ModelUtils {

    public static <T extends BaseModel<?>> void timeToNull(List<T> data) {
        for (T datum : data) {
            datum.setCreateTime(null);
            datum.setUpdateTime(null);
        }
    }

    public static <T extends BaseModel<?>> void createTimeToNull(List<T> data) {
        for (T datum : data) {
            datum.setCreateTime(null);
        }
    }

    public static <T extends BaseModel<?>> void updateTimeToNull(List<T> data) {
        for (T datum : data) {
            datum.setUpdateTime(null);
        }
    }

}
